package player

import "net"
import "network"

func Sender(conn *net.TCPConn, ch chan []byte) {
	sender := network.NewSender(conn, 1024)
	for {
		data := <- ch
		_, e := sender.SendData(data)
		if e != nil {
		 	break
		}
	}
}